The present disclosure relates to a communication device, a computer program product, and a communication method that are capable of measuring an available bandwidth of a communication path between communication devices.
When a communication device transmits data via a network, such as the Internet, the communication device needs to transmit the data at a transmission rate that is appropriate for an available transmission capacity. Hereinafter, the transmission capacity and the transmission rate are also referred to as a “bandwidth”. The available transmission capacity is referred to as an “available bandwidth”. The available bandwidth varies depending on a region, a provider and conditions such as a time zone. Accordingly, it is desirable for the communication device to select a bandwidth when transmitting data, in accordance with the available bandwidth that varies.
A method is known that identifies the available bandwidth in the following manner. First, the communication device includes, in each of measurement packets, time information to calculate a transmission interval of the measurement packets. The communication device transmits the measurement packets continuously while gradually changing the transmission intervals and thereby changing the bandwidths used for transmission. Another communication device receives the measurement packets and stores reception intervals of the measurement packets. After that, a difference between the transmission interval, which is calculated from the time information in the received measurement packet, and the stored reception interval is calculated. The available bandwidth is identified from the tendency of change in values of the calculated plurality of differences.
The available bandwidth is identified for each range of a predetermined bandwidth. Hereinafter, the bandwidth range is referred to as a “measurement bandwidth range”. The bandwidth that is used when transmitting the measurement packets is sequentially selected from within the measurement bandwidth range. The measurement packets are transmitted using the selected bandwidth, and it is determined whether or not the available bandwidth is included in the measurement bandwidth range. In a case where the available bandwidth is not included in the measurement bandwidth range, the measurement bandwidth range is extended. In a case where the available bandwidth is located on the narrowband side with respect to the measurement bandwidth range, the measurement bandwidth range is extended to the narrowband side. In a case where the available bandwidth is located on the wideband side with respect to the measurement bandwidth range, the measurement bandwidth range is extended to the wideband side.